const mongoose = require('mongoose')

const Schema = mongoose.Schema

const cateSchema = new Schema({
  name: {
    type: String,
    required: true
  },
  catid: {
    type: Number,
    required: true
  },
  remark: {
    type: String
  },
  sort: {
    type: Number
  },
  store: {
    type: String,
    // 1: 表示鸡排店 2: 甜品店
    default: "1",
    isReuired: true
  },

  // 非必须
  created_time: {
    type: Date,
    default: Date.now
  },
  last_modified_time: {
    type: Date,
    default: Date.now
  },
})

module.exports = mongoose.model('Cate', cateSchema)